Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
param-case
Advanced tools
The param-case package is a utility for converting text into 'param case', also known as 'kebab case', where words are lowercase and separated by hyphens. This is often used in URLs and file names.
Convert to Param Case
Converts a string to param case (kebab case), making it lowercase with words separated by hyphens.
const { paramCase } = require('param-case');
const result = paramCase('stringToConvert');
// Output: 'string-to-convert'
A comprehensive utility that includes param case conversion among other case transformations. It offers more general functionality compared to the focused approach of param-case.
Part of the Lodash library, this function converts strings to kebab case. It is similar to param-case but is part of a larger utility library with a wide range of functions.
Converts strings to URL slugs, which is similar to param case but also handles special characters and removes unwanted characters. It's more specialized for URL slug creation.
Param case a string.
Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a toString
property, numbers and booleans. Empty values (null
and undefined
) will result in an empty string.
npm install param-case --save
var paramCase = require('param-case')
paramCase('string') //=> "string"
paramCase('camelCase') //=> "camel-case"
paramCase('sentence case') //=> "sentence-case"
paramCase('MY STRING', 'tr') //=> "my-strıng"
Includes a TypeScript definition.
MIT
FAQs
Transform into a lower cased string with dashes between words
The npm package param-case receives a total of 7,493,535 weekly downloads. As such, param-case popularity was classified as popular.
We found that param-case demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.